#include "Headers.h"
#include "SchoolLogo.h"


CSchoolLogo::CSchoolLogo(void)
{
	m_nScene = 100;
}


CSchoolLogo::~CSchoolLogo(void)
{
}

bool CSchoolLogo::Initialize()
{
	
	if(m_UIManager.AddUIImage(IDB_SCHOOLLOGO, 0, 0) == false)
		return false;

	m_Count = 0;
	m_isTurn = false;

	return true;
}

void CSchoolLogo::Uninitialize()
{
	m_UIManager.RemoveUIImage();
}

void CSchoolLogo::Process()
{
	if(InputManager()->AnyKeyDwon() == true)
	{
		Application()->GetSceneManager()->LoadScene(TEAM_LOGO);
		return;
	}
	if(m_Count < 255 && m_isTurn == false)
	{
		if((m_Count+=3) >=255)
		{
			m_isTurn = true;
			m_Count =255;
		}
	}
	else if(m_isTurn == true)
	{
		if( (m_Count-=3) <= 0 )
		{
			Application()->GetSceneManager()->LoadScene(TEAM_LOGO);
			return;
		}
	}
}

void CSchoolLogo::Render(HDC hdc)
{
	m_UIManager.GetUIByNumber(0)->AlphaRender(hdc, m_Count);
}